const path = require('path')

// 基础配置
const config = {
  // 服务器配置
  server: {
    port: process.env.PORT || 9000,
    env: process.env.NODE_ENV || 'development',
    isServerless: process.env.SERVERLESS === 'true'
  },

  // COS配置
  cos: {
    secretId: process.env.SECRET_ID,
    secretKey: process.env.SECRET_KEY,
    bucket: process.env.COS_BUCKET,
    region: process.env.COS_REGION,
    baseUrl: `https://${process.env.COS_BUCKET}.cos.${process.env.COS_REGION}.myqcloud.com`
  },

  // 上传配置
  upload: {
    maxFileSize: 50 * 1024 * 1024, // 50MB
    allowedMimeTypes: ['audio/*']
  }
}

module.exports = config